home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1998 May
/
EnigmA AMIGA RUN 27 (1998)(G.R. Edizioni)(IT)[!][issue 1998-05].iso
/
earcd
/
sinclair-ql
/
setdate_bas
< prev
next >
Wrap
Text File
|
1998-02-11
|
3KB
|
91 lines
100 DIM Dat$(20),Mon$(36),M$(3),K$(1)
110 Dat$=DATE$
120 Mon$="JanFebMarAprMayJunJulAugSepOctNovDec"
130 Y%=Dat$(1 TO 4):M$=Dat$(6 TO 8):Mn%=((M$ INSTR Mon$)+2)/3:D%=Dat$(10 TO 11)
140 H%=Dat$(13 TO 14):M%=Dat$(16 TO 17):S%=Dat$(19 TO 20)
150 OPEN#4;"Con_512x256a0x0"
160 PAPER#4;228:INK#4;7:CLS#4
170 BANNER -1,10,7,4,"SPC:Select ¼ ¿:Reduce ½ ¾:Increase"
180 BANNER -1,50,7,210,"TIME: hh mm ss"
190 BANNER 190,90,7,210,NUM$(H%,2)
200 BANNER 238,90,7,210,NUM$(M%,2)
210 BANNER 286,90,7,210,NUM$(S%,2)
220 BANNER -1,130,7,210,"DATE: day month year"
230 BANNER 172,170,7,210,NUM$(D%,2)
240 BANNER 220,170,7,210,M$
250 BANNER 280,170,7,210,NUM$(Y%,4)
260 BANNER -1,210,7,4,"Esc:Abort ENTER:Set Clock & Quit"
270 F=0
280 REPeat Key_Loop%
290 SELect ON F
300 =0:BANNER_TXT 190,90,7,255,NUM$(H%,2)
310 =1:BANNER_TXT 238,90,7,255,NUM$(M%,2)
320 =2:BANNER_TXT 286,90,7,255,NUM$(S%,2)
330 =3:BANNER_TXT 172,170,7,255,NUM$(D%,2)
340 =4:BANNER_TXT 220,170,7,255,M$
350 =5:BANNER_TXT 280,170,7,255,NUM$(Y%,4)
360 END SELect
370 K$=INKEY$(#4,-1):K=CODE(K$)
380 SELect ON K
390 =32,10
400 SELect ON F
410 =0:BANNER_TXT 190,90,7,210,NUM$(H%,2)
420 =1:BANNER_TXT 238,90,7,210,NUM$(M%,2)
430 =2:BANNER_TXT 286,90,7,210,NUM$(S%,2)
440 =3:BANNER_TXT 172,170,7,210,NUM$(D%,2)
450 =4:BANNER_TXT 220,170,7,210,M$
460 =5:BANNER_TXT 280,170,7,210,NUM$(Y%,4)
470 END SELect
480 IF K=10 THEN
490 SDATE Y%,Mn%,D%,H%,M%,S%
500 EXIT Key_Loop%
510 END IF
520 F=(F+1) MOD 6
530 =200,208
540 SELect ON F
550 =0:H%=(H%+1) MOD 24
560 =1:M%=(M%+1) MOD 60
570 =2:S%=(S%+1) MOD 60
580 =3:D%=(D% MOD 31)+1
590 =4:Mn%=(Mn% MOD 12)+1:M$=Mon$(Mn%*3-2 TO Mn%*3)
600 =5:Y%=Y%+1
610 END SELect
620 =192,216
630 SELect ON F
640 =0:H%=(H%-1) MOD 24
650 =1:M%=(M%-1) MOD 60
660 =2:S%=(S%-1) MOD 60
670 =3:D%=((D%-2) MOD 31)+1
680 =4:Mn%=((Mn%-2) MOD 12)+1:M$=Mon$(Mn%*3-2 TO Mn%*3)
690 =5:Y%=Y%-1
700 END SELect
710 =27:EXIT Key_Loop%
720 END SELect
730 END REPeat Key_Loop%
740 CLOSE#4
750 STOP
760 DEFine PROCedure BANNER(Xx%,Yy%,Ink%,Pap%,F$)
770 LOCal L%,X%,Y%,W%,H%
780 L%=LEN(F$):W%=12*(L%+1):H%=30
790 IF Xx%<0 THEN X%=(512-W%)/2:ELSE X%=Xx%:END IF
800 IF Yy%<0 THEN Y%=(256-H%)/2:ELSE Y%=Yy%:END IF
810 BLOCK#4;W%,H%,X%+6,Y%+4,0
820 BLOCK#4;W%,H%,X%,Y%,0
830 BANNER_TXT Xx%,Yy%,Ink%,Pap%,F$
840 END DEFine
850 DEFine PROCedure BANNER_TXT(Xx%,Yy%,Ink%,Pap%,F$)
860 LOCal L%,X%,Y%,W%,H%
870 L%=LEN(F$):W%=12*(L%+1):H%=30
880 IF Xx%<0 THEN X%=(512-W%)/2:ELSE X%=Xx%:END IF
890 IF Yy%<0 THEN Y%=(256-H%)/2:ELSE Y%=Yy%:END IF
900 BLOCK#4;W%-4,H%-2,X%+2,Y%+1,Pap%
910 CSIZE#4;2,1:OVER#4;1:INK#4;0
920 CURSOR#4;X%+5,Y%+4:PRINT#4;F$;
930 CURSOR#4;X%+7,Y%+4:PRINT#4;F$;
940 CURSOR#4;X%+5,Y%+6:PRINT#4;F$;
950 CURSOR#4;X%+7,Y%+6:PRINT#4;F$;
960 INK#4;Ink%
970 CURSOR#4;X%+6,Y%+5:PRINT#4;F$;
980 END DEFine
990 DEFine FuNction NUM$(N%,M%):LOCal N$(32):N$=FILL$("0",M%)&N%:RETurn N$(LEN(N$)-M%+1 TO LEN(N$)):END DEFine